<?php
 ob_start();
session_start();
include_once("UserIncludes/DbConfig.php");

$lang=$_REQUEST['lang'];
$sqlLang ="select * from ".LANGUAGE." where langName='".$lang."' ";
//echo $sqlLang;
$queryLang=mysql_query($sqlLang);
$resLang=mysql_fetch_array($queryLang);
 $languageId=$resLang['langId'];
$_SESSION['languageId']=$languageId;
$_SESSION['langId']=$languageId;
//echo $_SESSION['langId'];
 $langname=$resLang['langName'];
$_SESSION['langname']=$langname;
//echo $GLOBALS['site_url'];die;
//echo '<script>window.location="'.$GLOBALS["site_url"].'";</script>';
//echo $_SESSION['langname'];
header("Location: {$GLOBALS['site_url']} ");	
ob_end_flush();

?>